Download and Configure Service Layer
-
Download the domain binaries as mentioned in the Prerequisites section of this document.
-
Copy the following configuration files from PASService-tomEE-distribution.zip/conf directory into the externallibs/sl_shared/conf directory under TomEE server.
-
service-coherence-cache-config.xml
-
service-coherence-config.xml
-
Configuration.properties
-
Service.properties
-
EDKeyValue.dat
-
logging.properties
-
oipakeystore.p12
-
-
Use a text editor to open the Service.properties file. The property application.encryptDecryptFilePath is deprecated and will be removed in future release. It is recommended to use application.keyStorePath and application.keyStoreAlias.
-
application.keyStorePath - Absolute path including file name where the oipakeystore.p12 is located.
Example: application.keyStorePath = /scratch/oipa/Oracle/oipa/conf/oipakeystore.p12.
-
application.keyStoreAlias - The alias is a unique identifier for the key entry (secret key) in the keystore.Do not modify this value unless the customer rotates the encryption key.
-
-
Copy the following files from the OIPA distribution zip/libs directory into the externallibs/sl_shared/lib directory:
-
jakarta.persistence-api-3.2.0.jar
-
Download aspectj 1.9.1.jar from http://www.eclipse.org/downloads/download.php?file=/tools/aspectj/aspectj-1.9.1.jar.
-
Open aspectj-1.9.1.jar with an unzipping software and retrieve aspectjrt.jar and aspectjweaver.jar from the lib folder.
-
Copy aspectjrt.jar and aspectjweaver.jar into lib sub-directory.
-
To define the following environment variables at docker run time using the -e option in the command line or define them in the sl_env.dat file.
The environment configuration variables, that need to be set for the TomEE server, and application configuration are defined below:
Note: Rename all the jars without version names.
Example:
jakarta.persistence.jar
aspectj.jar
aspectjrt.jar
aspectjweaver.jar
Note: Ensure you to copy the required libraries to the externallibs/sl_shared/lib directory before building the base image.
|
JDBCURL Configuration Parameters |
Variable |
|
Service Layer Application Port |
SL_PORT |
|
Server Port |
SERVER_PORT |
|
Application Redirect Port |
REDIRECT_PORT |
|
Enable AC |
ENABLE_AC |
|
JMX Port |
JMX_PORT |
|
Database Jar Used |
DBJar |
|
DataSource Configuration URL |
JDBCURL |
|
Database Username |
DSUSERNAME |
|
Database Password |
DSPASSWORD |
|
External Library Path |
EXT_LIB_PATH |
|
ATP Compatibility |
ATP_COMPLIANT |
Note: Refer to the sl_env.dat file for more information regarding these variables.
-
SL_PORT: Mention the ServiceLayer Application port. Ex: SL_PORT=5050
-
SERVER_PORT: Mention the Server Port. Ex: SERVER_PORT=8001
-
REDIRECT_PORT: Mention the Application Redirect Port. Ex: REDIRECT_PORT=7441
-
ENABLE_AC: This variable denotes whether the application is further connected to the Admin Console or not. Choose the appropriate option before provisioning the environment. Ex: ENABLE_AC=Yes, ENABLE_AC=No
-
JMX_PORT: Mention this port in order to expose JMX for remote connection. Ex: JMX_PORT=5555
-
DBJar: Based on the Database used for the application, mention the relevant jar.
Example:
Oracle: DBJar=ojdbc.jar
DB2: DBJar=db2jcc4.jar
MSSQL: DBJar=mssql-jdbc.jar
-
JDBCURL: Mention the DataSource Configuration URL based on the database selected.
-
ORACLE: JDBCURL=jdbc:oracle:thin:@<host>:<port>:<sid>
-
DB2: JDBCURL=jdbc:db2://<host>:<port>/<databasename>:currentSchema=<schemaname>;
if the schema name and username are different, please append currentfunctionpath to above url.
Example:
jdbcDriver = com.ibm.db2.jcc.DB2Driver
jdbcUrl = jdbc:db2://<host>:<port>/<databasename>:currentSchema= <schemaname>;currentFunctionPath=SYSIBM,SYSFUN,SYSPROC,SYSIBMADM,SYSHADOOP,USERNAME,SCHEMANAME;
-
MSSQL: JDBCURL=jdbc:sqlserver://<host>:<port>;DatabaseName=<databasename>
Example: For SQL Server
When the encrypt property is set to true and the trustServerCertificate property is set to true, the Microsoft JDBC Driver for SQL Server won't validate the SQL Server TLS certificate. This setting is common for allowing connections in test environments, such as where the SQL Server instance has only a self-signed certificate.
jdbcUrl = jdbc:sqlserver://<host>:<port>;DatabaseName=<databasename>;encrypt=true;trustServerCertificate=true
-
-
DSUSERNAME: Mention the username for the Data Source.
-
DSPASSWORD: Mention the password for the Data Source.
-
EXT_LIB_PATH: Define the Package Location inside the container (it is configured based on the base image used. No need to change the value of it).
Example: EXT_LIB_PATH=/usr/local/tomee/externallibs
-
ATP_COMPLIANT: This variable denotes whether the application is in compliance with ATP or not. Choose the appropriate option before provisioning the environment.
Example: ATP_COMPLIANT=Yes
If the SERVICE LAYER application is ATP compliant, then copy the required ATP (Autonomous Transaction Processing) database files under the externallibs/sl_shared/atp directory.
The following parameters need to be updated in the sl_env.dat file and the below jars need to be downloaded and copied to ojdbc folder.
we need to mention the coherence jar not to be scanned using Jar Scanner functionality. To achieve this in the same catalina.properties file, find the tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\ and add coherence*.jar and pdq*.jar
Note: To solve the DB2 latest Jar issues that comes with software, pdq.jar should not be scaned using Jar Scanner functionality.
tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\
--
--
coherence*.jar,\
--
pdq*.jar,\
--
The above configurations will be same for any instance of TomEE.
Set Environment Variables - TomEE
-
For Windows deployment we need to create setenv.bat file in the bin folder of extracted TomEE directory.
-
For Linux deployment we need to create setenv.sh file in the bin folder of extracted TomEE directory.
The following configuration needs to be placed in the setenv.bat file for Windows environment.
Classpath
set CATALINA_OPTS=-Xms128m -Xmx1024m -XX:+UseG1GC
-Dtangosol.coherence.cacheconfig="C:/<Server Path>/shared/conf/coherence-cache-config.xml"
-Dtangosol.pof.config=com-adminserver-pas-web-pof-config.xml
-Dtangosol.coherence.override="C:/<Server Path>/shared/conf/coherence-config.xml"
-Dtangosol.coherence.distributed.localstorage=true
-Djava.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-Dtangosol.coherence.mode=prod
-Djava.util.logging.config.file="C:/<Server Path>/shared/conf/logging.properties"
-Dserver.name="<Name of the server>" set OIPA_KEYSTORE_PWD=changeit
For Linux env in setenv.sh
ClassPath
export CATALINA_OPTS="-Xms128m -Xmx1024m -XX:+UseG1GC
-Dtangosol.coherence.cacheconfig=/Servers/TomEE/OIPAInstance/shared/conf/coherence-cache-config.xml
-Dtangosol.pof.config=com-adminserver-pas-web-pof-config.xml
-Dtangosol.coherence.override=/Servers/TomEE/OIPAInstance/shared/conf/coherence-config.xml
-Dtangosol.coherence.distributed.localstorage=true -Dtangosol.coherence.mode=prod
-Djava.util.logging.config.file=/Servers/TomEE/OIPAInstance/shared/conf/logging.properties
-Djava.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-Dserver.name=<Name of the server>"
export OIPA_KEYSTORE_PWD="changeit"
Add Following dependent JARs for ATP
Following JDBC JAR files are required to have a successful database connection: The jars must be placed under "/usr/local/tomee/externallibs/sl_shared/atp/ojdbc" directory.
Note: Download the JAR files here.
| JAR | Required | Description |
|---|---|---|
| ojdbc.jar | Required | JDBC Thin Driver, please follow OIPA installation documentation for supported JDBC driver version |
| ons.jar | Optional | Only needed in case FAN (Fast Application Notification) is configured for Oracle RAC cluster |
| oraclepki.jar | Required | Oracle PKI (public key infrastructure) provider for Oracle Wallets |
| osdt_cert.jar | Required | Oracle Security Developer Tool Certificates |
| osdt_core.jar | Required | Oracle Security Developer Tool Core |
| ucp.jar | Required | Universal Connection Pool |
Autonomous Transaction Processing Database (ATP) Variables
|
ATP Configuration Parameters |
Variables |
|
Wallet Location |
WALLET |
|
TNS DB name |
WALLETDB |
|
ATP Wallet Username |
WALLETUSERNAME |
|
ATP Wallet Password |
WALLETPASSWORD |
|
ATP Proxy |
ATP_PROXY |
|
ATP Proxy Port |
ATP_PROXY_PORT |
-
WALLET: Update the WALLET directory location ( which is preconfigured based on the container structure)
Example:
WALLET=/usr/local/tomee/externallibs/sl_shared/atp/wallet/
-
WALLETDB: Open tnsnames.ora file (present in the wallet) and note the TNS name that is suffixed with _tp for transaction processing.
Example: WALLETDB=oipadb_tp
-
WALLETUSERNAME: Mention the username for the ATP connection
-
WALLETPASSWORD: Mention the password for the ATP connection
-
ATP_PROXY: The ATP instance is on Public IP, if connecting over VPN, then you need to use an HTTP: PROXY
Example:
ATP_PROXY=www-proxy-hqdc.us.oracle.com
-
ATP_PROXY_PORT: Mention the HTTP: PROXY PORT
Example:
ATP_PROXY_PORT=80
The sample folder structure is as follows:
-
Under ojdbc folder copy all the libs downloaded
-
Under wallet folder